package com.summo.demo.controller;

import com.summo.demo.config.log.Log;
import com.summo.demo.model.request.AddReq;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class LoginController {

    @GetMapping("/login")
    public ModelAndView toLogin(@RequestParam(required = false) String redirectURL) {
        ModelAndView modelAndView = new ModelAndView("login");
        if(StringUtils.isNotBlank(redirectURL)){
            modelAndView.addObject("redirectURL",redirectURL);
        }
        return modelAndView;
    }
}
